%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Replication files for 

"Fiscal Activism and the Zero Nominal Interest Rate Bound"

by Sebastian Schmidt, sebastian.schmidt@ecb.int, July 2016

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Software requirements:
- MATLAB (8.0)
- CompEcon Toolbox for MATLAB, by Paul Fackler and Mario Miranda (http://www4.ncsu.edu/~pfackler/compecon/toolbox.html)


A. Full continuous state model 

Preliminary step:
- Execute the m-files Simulate_innovations.m and Simulate_innovations_IRF.m. 

Folder 'Grid search - with cp shock':
- Contains the files for the grid search for the optimal degree of fiscal activism in the model with preference and price mark-up shocks. 
- Execute OMFP_main.m (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces input for Figures 3 and 4.

Folder 'No delegation - with cp shock':
- Contains the files to solve and simulate the model with preference and price mark-up shocks under the benchmark regime. 
- Execute OMFP_main_no_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces Figure 7, and input for Figures 5 and 6.

Folder 'Delegation - with cp shock':
- Contains the files to solve and simulate the model with preference and price mark-up shocks under the optimal fiscally activist regime. 
- Execute OMFP_main_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces Figure 8, and input for Figures 5 and 6.

Folder 'Grid search - pref shock only':
- Contains the files for the grid search for the optimal degree of fiscal activism in the model with preference shocks only.
- Execute OMFP_main.m (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces input for Figure 4.

Folder 'Grid search - with cp shock - no zlb'
- Contains the files for the grid search for the optimal degree of fiscal activism in the model with preference and price mark-up shocks, and without the zero lower bound constraint.
- Execute OMFP_main.m (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces input for Figure 4.

Folder 'Grid search - with tech shock':
- Contains the files for the grid search for the optimal degree of fiscal activism in the model with preference and technology shocks. 
- Execute OMFP_main.m (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces input for Figure 3.

Folder 'No delegation - with tech shock':
- Contains the files to solve and simulate the model with preference and technology shocks under the benchmark regime. 
- Execute OMFP_main_no_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).

Folder 'Delegation - with tech shock':
- Contains the files to solve and simulate the model with preference and technology shocks under the optimal fiscally activist regime. 
- Execute OMFP_main_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).

Folder 'Grid search - with wcp shock':
- Contains the files for the grid search for the optimal degree of fiscal activism in the model with preference and wage mark-up shocks. 
- Execute OMFP_main.m (make sure to adjust the addpath command for the CompEcon Toolbox first).
- Produces input for Figure 3.

Folder 'No delegation - with wcp shock':
- Contains the files to solve and simulate the model with preference and wage mark-up shocks under the benchmark regime. 
- Execute OMFP_main_no_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).

Folder 'Delegation - with wcp shock':
- Contains the files to solve and simulate the model with preference and wage mark-up shocks under the optimal fiscally activist regime. 
- Execute OMFP_main_delegation (make sure to adjust the addpath command for the CompEcon Toolbox first).

Folder 'Figure 3 - welfare loss'
- Produces Figure 3. First run the grid search for the considered regimes and copy the result mat-files to this folder.

Folder 'Figure 4 - welfare loss cp'
- Produces Figure 4. First run the grid search for the considered regimes and copy the result mat-files to this folder.

Folder 'Figure 5 - equilibrium responses'
- Produces Figure 5.


B. Model with inflation inertia (Online Appendix)

- Contains the files for the grid search for the optimal degree of fiscal activism in the model with inflation inertia.
- Execute the m-file Simulate_innovations.m and adjust the addpath command for the CompEcon Toolbox in OMFP.m.
- Execute OMFP.m to start the grid search (set 'tau' to determine the degree of price indexation).
- Create_welfare_chart.m produces Figure 1 in the Online Appendix.

